3.197 \(\int \cos (c+d x) \sin ^2(c+d x) (a+a \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=55 \[ \frac {a^2 \sin ^5(c+d x)}{5 d}+\frac {a^2 \sin ^4(c+d x)}{2 d}+\frac {a^2 \sin ^3(c+d x)}{3 d} \]

[Out]

1/3*a^2*sin(d*x+c)^3/d+1/2*a^2*sin(d*x+c)^4/d+1/5*a^2*sin(d*x+c)^5/d

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2833, 12, 43} \[ \frac {a^2 \sin ^5(c+d x)}{5 d}+\frac {a^2 \sin ^4(c+d x)}{2 d}+\frac {a^2 \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*Sin[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]

[Out]

(a^2*Sin[c + d*x]^3)/(3*d) + (a^2*Sin[c + d*x]^4)/(2*d) + (a^2*Sin[c + d*x]^5)/(5*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2833

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rubi steps

\begin {align*} \int \cos (c+d x) \sin ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2 (a+x)^2}{a^2} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\operatorname {Subst}\left (\int x^2 (a+x)^2 \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2 x^2+2 a x^3+x^4\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^4(c+d x)}{2 d}+\frac {a^2 \sin ^5(c+d x)}{5 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.34, size = 53, normalized size = 0.96 \[ \frac {a^2 \left (104 \sin ^3(c+d x)+15 \cos (4 (c+d x))-12 \left (2 \sin ^3(c+d x)+5\right ) \cos (2 (c+d x))\right )}{240 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*Sin[c + d*x]^2*(a + a*Sin[c + d*x])^2,x]

[Out]

(a^2*(15*Cos[4*(c + d*x)] + 104*Sin[c + d*x]^3 - 12*Cos[2*(c + d*x)]*(5 + 2*Sin[c + d*x]^3)))/(240*d)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 72, normalized size = 1.31 \[ \frac {15 \, a^{2} \cos \left (d x + c\right )^{4} - 30 \, a^{2} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, a^{2} \cos \left (d x + c\right )^{4} - 11 \, a^{2} \cos \left (d x + c\right )^{2} + 8 \, a^{2}\right )} \sin \left (d x + c\right )}{30 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/30*(15*a^2*cos(d*x + c)^4 - 30*a^2*cos(d*x + c)^2 + 2*(3*a^2*cos(d*x + c)^4 - 11*a^2*cos(d*x + c)^2 + 8*a^2)
*sin(d*x + c))/d

________________________________________________________________________________________

giac [A]  time = 0.16, size = 45, normalized size = 0.82 \[ \frac {6 \, a^{2} \sin \left (d x + c\right )^{5} + 15 \, a^{2} \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3}}{30 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/30*(6*a^2*sin(d*x + c)^5 + 15*a^2*sin(d*x + c)^4 + 10*a^2*sin(d*x + c)^3)/d

________________________________________________________________________________________

maple [A]  time = 0.09, size = 45, normalized size = 0.82 \[ \frac {\frac {\left (\sin ^{5}\left (d x +c \right )\right ) a^{2}}{5}+\frac {a^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{2}+\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*sin(d*x+c)^2*(a+a*sin(d*x+c))^2,x)

[Out]

1/d*(1/5*sin(d*x+c)^5*a^2+1/2*a^2*sin(d*x+c)^4+1/3*a^2*sin(d*x+c)^3)

________________________________________________________________________________________

maxima [A]  time = 0.30, size = 45, normalized size = 0.82 \[ \frac {6 \, a^{2} \sin \left (d x + c\right )^{5} + 15 \, a^{2} \sin \left (d x + c\right )^{4} + 10 \, a^{2} \sin \left (d x + c\right )^{3}}{30 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)^2*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/30*(6*a^2*sin(d*x + c)^5 + 15*a^2*sin(d*x + c)^4 + 10*a^2*sin(d*x + c)^3)/d

________________________________________________________________________________________

mupad [B]  time = 8.49, size = 36, normalized size = 0.65 \[ \frac {a^2\,{\sin \left (c+d\,x\right )}^3\,\left (6\,{\sin \left (c+d\,x\right )}^2+15\,\sin \left (c+d\,x\right )+10\right )}{30\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)*sin(c + d*x)^2*(a + a*sin(c + d*x))^2,x)

[Out]

(a^2*sin(c + d*x)^3*(15*sin(c + d*x) + 6*sin(c + d*x)^2 + 10))/(30*d)

________________________________________________________________________________________

sympy [A]  time = 2.60, size = 63, normalized size = 1.15 \[ \begin {cases} \frac {a^{2} \sin ^{5}{\left (c + d x \right )}}{5 d} + \frac {a^{2} \sin ^{4}{\left (c + d x \right )}}{2 d} + \frac {a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (a \sin {\relax (c )} + a\right )^{2} \sin ^{2}{\relax (c )} \cos {\relax (c )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*sin(d*x+c)**2*(a+a*sin(d*x+c))**2,x)

[Out]

Piecewise((a**2*sin(c + d*x)**5/(5*d) + a**2*sin(c + d*x)**4/(2*d) + a**2*sin(c + d*x)**3/(3*d), Ne(d, 0)), (x
*(a*sin(c) + a)**2*sin(c)**2*cos(c), True))

________________________________________________________________________________________